<?php
namespace app\api\controller\v1\wechat\official_account;
use app\api\controller\v1\Init;

/**
 * 菜单
 * @package app\api\controller\v1\wechat\official_account
 */
class Menu extends Init
{

    public function _initialize() {
		parent::_initialize();
		$this->model = model('wechat/official_account', 'service');
	}

    /**
     * 查询已设置菜单
     */
	public function lists() {
        $r =  $this->model->menu->list();
        print_r($r);
    }

    public function create() {
	    $button = config('wechat.menu');
	    // 个性化菜单
	    $matchRule = [];
        $r =  $this->model->menu->create($button, $matchRule);
        print_r($r);
    }

    public function _empty()
    {
        $action = $this->request->action();
        $result =  $this->model->menu->$action();
        print_r($result);
    }


}